@w-code-preview:~"w-code-preview";

.@{w-code-preview} {
  &.w-split-horizontal > .w-split-bar {
    height: initial;
  }
}
.@{w-code-preview} {
  border-radius: 3px;
  margin-bottom: 16px;
  background-color: #fff;
  max-height: 420px;
  min-height: 12px;
  z-index: 10;
  position: relative;
  &-bordered {
    box-shadow: 0 0 0 1px rgba(16, 22, 26, 0.1), 0 0 0 rgba(16, 22, 26, 0), 0 1px 1px rgba(16, 22, 26, 0.2);
  }
  &-fullScreen {
    position: fixed;
    background-color: #fff;
    border-radius: 0;
    border: 0;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    margin: 0 !important;
    right: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    z-index: 99999;
  }
  &-demo-source {
    input {
      margin: initial;
      vertical-align: initial;
    }
    blockquote, details, dl, ol, p, pre, table, ul {
      margin-bottom: initial;
      margin-top: initial;
    }
    pre, code, tt {
      font-family: inherit;
    }
    img {
      max-width: initial;
    }
    h1, h2 {
      border-bottom: initial;
      padding-bottom: initial;
    }
    h1, h2, h3, h4, h5, h6 {
      font-weight: initial;
      line-height: initial;
      margin-bottom: initial;
      margin-top: initial;
      font-size: initial;
    }
    ul {
      margin-bottom: initial;
      margin-top: initial;
      list-style: initial;
    }
  }
  &-demo {
    border-radius: 3px;
    position: relative;
    overflow: auto;
    min-width: 100px;
    position: relative;
    padding: 15px;
    min-height: 80px;
    &-error {
      z-index: 2;
      background: #fff;
      width: 100%;
      height: 100%;
      margin-bottom: 0 !important;
      color: #dc3545 !important;
    }
    &-bgPlaid:not(&-error) {
      background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cpattern id='a' width='16' height='16' patternUnits='userSpaceOnUse'%3E%3Cpath fill='rgba(0, 0, 0, 0.06)' d='M0 0h8v8H0zM8 8h8v8H8z'/%3E%3C/pattern%3E%3Crect fill='url(%23a)' width='100%25' height='100%25'/%3E%3C/svg%3E");
    }
    &-source.error {
      display: none;
    }
  }
  &-noScroll {
    max-height: initial;
  }
  &-noScroll &-demo {
    overflow: inherit;
  }
  &-bgPlaid {
    box-sizing: border-box;
    position: absolute;
    left: 0;
    bottom: 0;
    right: 0;
    top: 0;
    svg {
      opacity: 0.7;
    }
  }
  &-bar {
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.03);
    box-shadow: inset 1px 0 0 0 #d5d5d5;
    padding: 3px 3px 8px 2px;
    margin: 0 auto;
    color: rgba(0, 0, 0, 0.45);
    writing-mode: tb-rl;
    position: relative;
    display: flex;
    width: 29px;
    line-height: 24px;
    font-size: 14px;
    max-width: 29px;
    min-width: 29px;
    min-height: 29px;
    &-btn {
      overflow: hidden;
      padding: 5px 0;
      transition: all .3s;
      user-select: none;
      flex: 1;
      &:hover {
        color: #000;
      }
    }
    &-iconbtns {
      margin-top: 5px;
      margin-right: 3px;
      height: 15px;
      width: 15px;
      line-height: 22px;
    }
    svg {
      transition: all .3s;
      fill: #9c9c9c;
      display: block;
      &:hover {
        fill: #000;
      }
    }
    &-copied svg, &-copied svg:hover {
      fill: #28a745;
    }
  }
  &-OneItem &-bar {
    cursor: inherit;
  }
}
